package com.perfree.entity;

import com.perfree.common.ITree;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;

@Data
@Table(name = "t_resource")
public class Resource implements ITree {

    @Id
    private Integer id;
    private String title;
    @Column(name = "desc_")
    private String desc;
    @Column(name = "path_")
    private String path;
    @Column(name = "allow_file")
    private String allowFile;
    @Column(name = "pid")
    private Integer parentId;

    @Column(name = "createTime")
    private Date createTime = new Date();
    @Column(name = "updateTime")
    private Date updateTime;

    @Column(name = "sort_num")
    private Integer sortNum;

    @Column(name = "is_share")
    private Integer isShare = 1;

    private List<ITree> children;

}
